/*
 * Date：10/23/18 9:59 PM
 * Author: guomw
 *
 */

package com.treasure.mall.biz.entity.auth;

import com.treasure.mall.biz.entity.Base2PO;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 系统角色
 *
 * @author guomw
 * @date 2018/9/14
 */
@Entity
@Data
@Table(name = "sys_role"
)
public class SystemRole extends Base2PO implements Serializable {
    private static final long serialVersionUID = -3650226372920722595L;

    /**
     * ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "role_id")
    private Integer roleId;

    /**
     * 用户ID
     */
    @Column(name = "user_id")
    private Integer userId;

    /**
     * 角色名称
     */
    @Column(name = "role_name")
    private String roleName;

    /**
     * 菜单权限，多个权限用'|' 隔开
     */
    @Column(name = "authority", columnDefinition = "text")
    private String authority;


    /**
     * 是否启用
     */
    @Column(name = "enable")
    private boolean enable;

    /**
     * 系统默认角色,-1 为系统超级管理员角色
     */
    @Column(name = "role_type")
    private int roleType;
}
